SpecialUndelete: Follow-up to 6cf13604aec40e2210c16ccdbeba850de9428d19
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index e6e9400..810f8fb 100644 (file)
@@ -713,6 +713,8 @@ class SpecialUndelete extends SpecialPage {
                }
 
                if ( $this->mAllowed ) {
+                       $out->enableOOUI();
+
                        $action = $this->getPageTitle()->getLocalURL( [ 'action' => 'submit' ] );
                        # Start the form here
                        $form = new OOUI\FormLayout( [
@@ -734,8 +736,6 @@ class SpecialUndelete extends SpecialPage {
                }
 
                if ( $this->mAllowed && ( $haveRevisions || $haveFiles ) ) {
-                       $out->enableOOUI();
-
                        $fields[] = new OOUI\Layout( [
                                'content' => new OOUI\HtmlSnippet( $this->msg( 'undeleteextrahelp' )->parseAsBlock() )
                        ] );
@@ -857,7 +857,6 @@ class SpecialUndelete extends SpecialPage {
                        # Slip in the hidden controls here
                        $misc = Html::hidden( 'target', $this->mTarget );
                        $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() );
-                       $misc .= Xml::closeElement( 'form' );
                        $history .= $misc;
                }